package com.taokatao.cardmee.api;

import com.taokatao.cardmee.App;

import java.lang.reflect.Type;

public class RespWrapper<T> {
    public int code;
    public String message;
    public String data;

    public T decode(Type type) {
        return App.i().getGson().fromJson(justDecryptDataValue(), type);
    }

    public String justDecryptDataValue() {
        return ApiManager.i().decrypt(data);
    }
}
